import request from "../js/request";

export default {
	// https://api.fahuren.com/api/index/getVersion
	logoff: (data) =>
		request({
			method: "POST",
			url: "/api/user/logoff",
			data
		}),
	logout: (data) =>
		request({
			method: "POST",
			url: "/api/user/logout",
			data
		}),
	getOpenGif: (data) =>
		request({
			method: "GET",
			url: "/api/config/getByName",
			data
		}),

	getVersion: (data) =>
		request({
			method: "GET",
			url: "/api/index/getVersion",
			data,
		}),
	// 一键登录接口
	getOnlyMobileLogin: (data) =>
		request({
			method: "POST",
			url: "/api/user/onlyMobileLogin",
			data,
		}, {
			loading: "登录中...",
			isToast: true,
		}),

	// 发送验证码
	send: (data) =>
		request({
			method: "POST",
			url: "/api/sms/send",
			data,
		}, {
			loading: "发送中...",
			isToast: true,
		}),

	// 密码登录接口
	login: (data) =>
		request({
			method: "POST",
			url: "/api/user/login",
			data,
		}, {
			loading: "登录中...",
			isToast: true,
		}),
	// 验证码登录接口
	mobilelogin: (data) =>
		request({
			method: "POST",
			url: "/api/user/mobilelogin",
			data,
		}, {
			loading: "登录中...",
			isToast: true,
		}),

	// 验证码登录接口
	resetpwd: (data) =>
		request({
			method: "POST",
			url: "/api/user/resetpwd",
			data,
		}, {
			loading: "登录中...",
			isToast: true,
		}),
	// 获取二手乐器列表
	getyqChildByName: (data) =>
		request({
			method: "GET",
			url: "/api/dev_label/getChildByName",
			data,
		}),
	// 获取帖子列表
	getTrends: (data) =>
		request({
			method: "GET",
			url: "/api/trends/index",
			data,
		}),
	// 发布帖子
	getTrendsInsert: (data) =>
		request({
			method: "POST",
			url: "/api/trends/insert",
			data,

		}),
	// 获取帖子详情
	getTrendsDetail: (data) =>
		request({
			method: "POST",
			url: "/api/trends/detail",
			data,

		}),
	// 获取评论列表
	getDev_comment: (data) =>
		request({
			method: "GET",
			url: "/api/dev_comment/index",
			data,
		}),

	// 点赞/取消点赞接口
	getTrendsGoods: (data) =>
		request({
			method: "POST",
			url: "/api/trends/goods",
			data,
		}),
	// 关注取消接口
	getTrendsFollow: (data) =>
		request({
			method: "POST",
			url: "/api/trends/follow",
			data,
		}),
	// 发布评论接口
	getCommentInsert: (data) =>
		request({
			method: "POST",
			url: "/api/dev_comment/insert",
			data,
		}),

	// 删除帖子接口
	getTrendsDeletet: (data) =>
		request({
			method: "POST",
			url: "/api/trends/delete",
			data,
		}),

	// 举报帖子接口
	getTrendsComplaint: (data) =>
		request({
			method: "POST",
			url: "/api/trends/complaint",
			data,
		}),
	// 广告接口
	getAdvDetail: (data) =>
		request({
			method: "POST",
			url: "/api/trends/advDetail",
			data,
		}),
	// 求货出价列表接口
	getdevAskgoodsPrice: (data) =>
		request({
			method: "POST",
			url: "/api/dev_askgoods_price/index",
			data,
		},),
	// 求货出价接口
	getdevAskgoodsPriceInsert: (data) =>
		request({
			method: "POST",
			url: "/api/dev_askgoods_price/insert",
			data,
		}),
	// 求货出价详情接口
	getdevAskgoodsPriceDetail: (data) =>
		request({
			method: "POST",
			url: "/api/dev_askgoods_price/detail",
			data,
		}),
	// 用户列表接口
	getuserList: (data) =>
		request({
			method: "GET",
			url: "/api/user/userList",
			data,
		}),

	// 用户信息接口
	getUserById: (data) =>
		request({
			method: "GET",
			url: "/api/user/getUserById",
			data,
		}),

	// 用户信息接口
	getUserById: (data) =>
		request({
			method: "GET",
			url: "/api/user/getUserById",
			data,
		}),

	// 用户拉黑接口
	getUserblack: (data) =>
		request({
			method: "POST",
			url: "/api/dev_user_black/black",
			data,
		}),

	// 用户移除拉黑接口
	getUserdelete: (data) =>
		request({
			method: "POST",
			url: "/api/dev_user_black/delete",
			data,
		}),
	// 我的信息接口
	getMyInfo: (data) =>
		request({
			method: "POST",
			url: "/api/user/myInfo",
			data,
		}),

	// 我收益列表接口
	getUserfundList: (data) =>
		request({
			method: "POST",
			url: "/api/dev_user_fund/getList",
			data,
		}),

	// 提现接口
	getWithdraw: (data) =>
		request({
			method: "POST",
			url: "/api/dev_user_fund/withdraw",
			data,
		}),
	// 修改手机号接口
	changemobile: (data) =>
		request({
			method: "POST",
			url: "/api/user/changemobile",
			data,
		}),
	// 修改信息接口
	changeProfile: (data) =>
		request({
			method: "POST",
			url: "/api/user/profile",
			data,
		}),

	// 修改信息接口
	getblackList: (data) =>
		request({
			method: "GET",
			url: "/api/dev_user_black/getList",
			data,
		}),

	// 我要推广
	getInviteRule: (data) =>
		request({
			method: "GET",
			url: "/api/user/inviteRule",
			data,
		}),

	// 邀请推广记录
	getInviteList: (data) =>
		request({
			method: "GET",
			url: "/api/user/inviteList",
			data,
		}),
	// 招标投标列表接口
	getDev_inviteList: (data) =>
		request({
			method: "GET",
			url: "/api/dev_invite/index",
			data,
		}),

	// 招标投标详情接口
	getDev_inviteDetail: (data) =>
		request({
			method: "GET",
			url: "/api/dev_invite/detail",
			data,
		}),

	//获取品牌接口
	getDev_applyGetBrandList: (data) =>
		request({
			method: "GET",
			url: "/api/dev_apply/getBrandList",
			data,
		}),
	//申请机构/制造商
	getDev_applyApply: (data) =>
		request({
			method: "POST",
			url: "/api/dev_apply/apply",
			data,
		}),
	//添加品牌
	getDev_applyAddBrand: (data) =>
		request({
			method: "POST",
			url: "/api/dev_apply/addBrand",
			data,
		}),
	// 机构制造商详情
	getDev_applyDetail: (data) =>
		request({
			method: "GET",
			url: `/api/dev_apply/detail?types=${data.types}`,
			data,
		}),
		//会员信息
		getInviteInfo: (data) =>
			request({
				method: "GET",
				url: `/api/user/getInviteInfo`,
				data,
			}),
	// 下单
	// file:///E:/360MoveData/Users/xie/Desktop/company_code/anmoyonghu/common/pay.js
	commonPay: (data) =>
		request({
			method: "POST",
			url: "/api/pay/create",
			data,
		}),
	// 支付
	commonPayCall: (data) =>
		request({
			method: "POST",
			url: "/api/pay/call",
			data,
		}),
	// 支付回调
	commonPayNotify: (data) =>
		request({
			method: "POST",
			url: "/api/pay/notify",
			data,
		}),



	// 获取省市区
	getArea: () =>
		request({
			method: "GET",
			url: "/api/common/getArea",
		}),

	// 保存省市区
	// setProfile: (data) =>
	// 	request({
	// 		method: "POST",
	// 		url: "/api/user/profile",
	// 		data
	// 	}),

	// 小程序一键登录接口
	getWechatMobile: (data) =>
		request({
			method: "POST",
			url: "/api/login/getWechatMobile",
			data,
		}, {
			loading: "登录中...",
			isToast: true,
		}),
	// 验证手机号是否注册接口
	checkMobileRegister: (data) =>
		request({
			method: "POST",
			url: "/api/user/checkMobileRegister",
			data,
		}, {
			loading: "提交中...",
			isToast: true,
		}),
	// 用户首次登录补充信息接口
	supplementUserInfo: (data) =>
		request({
			method: "POST",
			url: "/api/user/supplementUserInfo",
			data,
		}, {
			loading: "提交中...",
			isToast: true,
		}),
	// 用户端重置密码接口
	resetpwd: (data) =>
		request({
			method: "POST",
			url: "/api/user/resetpwd",
			data,
		}, {
			loading: "提交中...",
			isToast: true,
		}),
	// 用户注册接口
	register: (data) =>
		request({
			method: "POST",
			url: "/api/user/register",
			data,
		}, {
			isToast: true,
		}),
	// 用户注册协议 隐私政策接口接口
	getPrivacy: (data) =>
		request({
			method: "GET",
			url: "/api/index/userPrivacy",
			data
		}),
	getAgreement: (data) =>
		request({
			method: "GET",
			url: "/api/index/userAgreement",
			data
		}),

	// 获取首页轮播图
	getBanner: (data) =>
		request({
			method: "GET",
			url: "/api/dev_banner/index",
			data,
		}),
	// 切换身份
	switchIdentity: (data) =>
		request({
			method: "POST",
			url: "/api/dev_personal/switchIdentity",
			data,
		}),
	// 法律类型
	getLegalType: () =>
		request({
			method: "GET",
			url: "/api/common/getLegalType",
		}),
	// 多层级营销专栏
	getMarketingPromotion: () =>
		request({
			method: "GET",
			url: "/api/index/getMarketingPromotion",
		}),
	// 订单创建及支付
	orderCreate: (data) =>
		request({
			method: "POST",
			url: "/api/dev_pay/create",
			data
		}, {
			loading: "提交中...",
			isToast: true,
		}),
	// 支付回调，测试时才能用
	payNotify: (data) =>
		request({
			method: "GET",
			url: "/api/dev_pay/notify",
			data
		}),
	// 电话咨询获取虚拟电话
	getVirtualMobile: (data) =>
		request({
			method: "POST",
			url: "/api/common/getVirtualMobile",
			data
		}),
};